package com.visikard.item;

import java.io.Serializable;
import java.util.List;

import org.json.JSONObject;

public class ItemCouponsBuilder implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	long idCampaignSpecail;
	long idCoupon;
	long fkUser;
	long fkKard;
	String logos;
	String merchantName;
	String imageSpecial;
	String campaignDetail;
	String specailDetail;// //condition and term
	String textImage1;
	String textImage2;
	String icons;
	String imageKard;
	String address;
	long categoryCard;// categoryCard = 1-coupon, 2-giftkard,3-punk-card
	String expireDate;
	String conditions;
	String latitude;
	String longitude;
	String aboutBusiness;
	int campaignType;
	String couponName;
	List<GetLocationSpecialItem> location;

	public ItemCouponsBuilder() {
	}

	public ItemCouponsBuilder(JSONObject job) {
		if (job == null)
			return;

		try {
			idCampaignSpecail = job.optLong("idCampaignSpecail", -1);
			idCoupon = job.optLong("idCoupon", -1);
			fkUser = job.optLong("fkUser", -1);
			fkKard = job.optLong("fkKard", -1);
			
			logos = job.optString("logos", "");
			if(logos == null || logos.equals("null"))
				logos = "";
			
			merchantName = job.optString("merchantName", "");
			if(merchantName == null || merchantName.equals("null"))
				merchantName = "";
			
			imageSpecial = job.optString("imageSpecial", "");
			if(imageSpecial == null || imageSpecial.equals("null"))
				imageSpecial = "";
			
			campaignDetail = job.optString("campaignDetail", "");
			if(campaignDetail == null || campaignDetail.equals("null"))
				campaignDetail = "";
			
			specailDetail = job.optString("specailDetail", "");
			if(specailDetail == null || specailDetail.equals("null"))
				specailDetail = "";
			
			textImage1 = job.optString("textImage1", "");
			if(textImage1 == null || textImage1.equals("null"))
				textImage1 = "";
			
			textImage2 = job.optString("textImage2", "");
			if(textImage2 == null || textImage2.equals("null"))
				textImage2 = "";
			
			icons = job.optString("icons", "");
			if(icons == null || icons.equals("null"))
				icons = "";
			
			imageKard = job.optString("imageKard", "");
			if(imageKard == null || imageKard.equals("null"))
				imageKard = "";
			
			address = job.optString("address", "");
			if(address == null || address.equals("null"))
				address = "";
			
			categoryCard = job.optLong("categoryCard", 0);
			
			expireDate = job.optString("expireDate", "");
			if(expireDate == null || expireDate.equals("null"))
				expireDate = "";
			
			conditions = job.optString("conditions", "");
			if(conditions == null || conditions.equals("null"))
				conditions = "";
			
			latitude = job.optString("latitude", "0");
			if(latitude == null || latitude.equals("null"))
				latitude = "0";
			
			longitude = job.optString("longitude", "0");
			if(longitude == null || longitude.equals("null"))
				longitude = "0";
			
			aboutBusiness = job.optString("aboutBusiness", "0");
			if(aboutBusiness == null || aboutBusiness.equals("null"))
				aboutBusiness = "0";
			
			campaignType = job.optInt("campaignType", 0);
			
			couponName = job.optString("couponName", "0");
			if(couponName == null || couponName.equals("null"))
				couponName = "0";
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public Long getIdCampaignSpecail() {
		return idCampaignSpecail;
	}

	public void setIdCampaignSpecail(Long idCampaignSpecail) {
		this.idCampaignSpecail = idCampaignSpecail;
	}

	public Long getIdCoupon() {
		return idCoupon;
	}

	public void setIdCoupon(Long idCoupon) {
		this.idCoupon = idCoupon;
	}

	public Long getFkUser() {
		return fkUser;
	}

	public void setFkUser(Long fkUser) {
		this.fkUser = fkUser;
	}

	public Long getFkKard() {
		return fkKard;
	}

	public void setFkKard(Long fkKard) {
		this.fkKard = fkKard;
	}

	public String getLogos() {
		return logos;
	}

	public void setLogos(String logos) {
		this.logos = logos;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public String getImageSpecial() {
		return imageSpecial;
	}

	public void setImageSpecial(String imageSpecial) {
		this.imageSpecial = imageSpecial;
	}

	public String getCampaignDetail() {
		return campaignDetail;
	}

	public void setCampaignDetail(String campaignDetail) {
		this.campaignDetail = campaignDetail;
	}

	public String getSpecailDetail() {
		return specailDetail;
	}

	public void setSpecailDetail(String specailDetail) {
		this.specailDetail = specailDetail;
	}

	public String getTextImage1() {
		return textImage1;
	}

	public void setTextImage1(String textImage1) {
		this.textImage1 = textImage1;
	}

	public String getTextImage2() {
		return textImage2;
	}

	public void setTextImage2(String textImage2) {
		this.textImage2 = textImage2;
	}

	public String getIcons() {
		return icons;
	}

	public void setIcons(String icons) {
		this.icons = icons;
	}

	public String getImageKard() {
		return imageKard;
	}

	public void setImageKard(String imageKard) {
		this.imageKard = imageKard;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public long getCategoryCard() {
		return categoryCard;
	}

	public void setCategoryCard(long categoryCard) {
		this.categoryCard = categoryCard;
	}

	public String getExpireDate() {
		return expireDate;
	}

	public void setExpireDate(String expireDate) {
		this.expireDate = expireDate;
	}

	public String getConditions() {
		return conditions;
	}

	public void setConditions(String conditions) {
		this.conditions = conditions;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getAboutBusiness() {
		return aboutBusiness;
	}

	public void setAboutBusiness(String aboutBusiness) {
		this.aboutBusiness = aboutBusiness;
	}

	public int getCampaignType() {
		return campaignType;
	}

	public void setCampaignType(int campaignType) {
		this.campaignType = campaignType;
	}

	public List<GetLocationSpecialItem> getLocation() {
		return location;
	}

	public void setLocation(List<GetLocationSpecialItem> location) {
		this.location = location;
	}

	public String getCouponName() {
		return couponName;
	}
	
}
